from django.conf.urls.defaults import *
from django.conf import settings
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    (r'^site_media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
    url(r'^accounts/login/$', 'django.contrib.auth.views.login', name='login'),
    url(r'^accounts/logout/$', 'django.contrib.auth.views.logout', name='logout'),
    url(r'^accounts/new/$', 'student.views.register', name='signup'),
    url(r'^$', 'plan.views.index', name='index'),
    url(r'^profile/$', 'student.views.edit_profile', name='edit_profile'),

    (r'^students/', include('student.urls')),
    (r'^courses/', include('course.urls')),
    (r'^plans/', include('plan.urls')),
    (r'^schedules/', include('schedule.urls')),
    (r'^admin/doc/', include('django.contrib.admindocs.urls')),
    (r'^admin/(.*)', admin.site.root),
    (r'^comments/', include('django.contrib.comments.urls')),
)
